<?php

namespace common\entities\myhtsq;

use Yii;

/**
 * This is the model class for table "myscrm_contract_document".
 *
 * @property string $document_id
 * @property string $contract_id
 * @property string $pigeonhole_date
 * @property string $document_name
 * @property string $keeper
 * @property string $contract_document_type
 * @property string $document_ext_name
 * @property string $document_path
 * @property string $document_dir
 * @property string $created_on
 * @property string $created_by
 * @property string $modified_on
 * @property string $modified_by
 */
class ContractDocumentEntity extends \common\entities\ConfigEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_contract_document';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['pigeonhole_date', 'created_on', 'modified_on','document_id'], 'safe'],
            [['document_id', 'contract_id', 'keeper', 'created_by', 'modified_by'], 'string', 'max' => 36],
            [['document_name'], 'string', 'max' => 100],
            [['contract_document_type'], 'string', 'max' => 30],
            [['document_ext_name'], 'string', 'max' => 10],
            [['document_type'], 'string', 'max' => 10],
            [['document_path'], 'string', 'max' => 500],
            [['document_dir'], 'string', 'max' => 150]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'document_id' => '文档ID',
            'contract_id' => '合同ID',
            'pigeonhole_date' => '文档归档日期',
            'document_name' => '文档名称',
            'keeper' => '保管人',
            'contract_document_type' => '纸质合同类型',
            'document_ext_name' => '文件类型',
            'document_type' => '文档类型',
            'document_path' => '存放路径',
            'document_dir' => '所属文件夹名称',
            'created_on' => '创建时间',
            'created_by' => '创建人',
            'modified_on' => '修改时间',
            'modified_by' => '修改人',
        ];
    }
}
